package cn.matezk.cloud.controller;

import cn.matezk.cloud.model.User;
import cn.matezk.cloud.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    private IUserService userService;

    @GetMapping()
    public User query(User user) {
        return userService.select(user);
    }

    @PostMapping()
    public int update(@RequestBody User user) {
        return userService.update(user);
    }
}
